package com.ggkt.collection;

import java.util.ArrayList;

/**
 * @author ggkt
 * ArrayList添加删除慢，查询快；
 */
public class ArrayListDemo {
    public static void main(String[] args) {
        ArrayList alist = new ArrayList();
        alist.add("Atom");
        alist.add("Bang");
        alist.add("Cart");
        for(Object object:alist){
            System.out.println(object);
        }
        alist.remove(2);
        System.out.println("after remove index_2,the list is: ");
        for(Object object:alist){
            System.out.println(object);
        }
    }
}
